Skip to content

[CORE] Log error when -Xms equals -Xmx makes JVM heap shrinking ineffective#12480

Open
xumanbu wants to merge 1 commit into
apache:mainfrom
xumanbu:GLUTEN-12479
Open

[CORE] Log error when -Xms equals -Xmx makes JVM heap shrinking ineffective#12480
xumanbu wants to merge 1 commit into
apache:mainfrom
xumanbu:GLUTEN-12479

Conversation

@xumanbu

@xumanbu xumanbu commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Add a check in DynamicOffHeapSizingMemoryTarget static initializer to detect when -Xms equals or is very close to -Xmx. In this scenario, the JVM heap size is fixed and System.gc() cannot shrink totalMemory (return committed pages to OS), making the shrinkOnHeapMemory mechanism ineffective. An error log is emitted to alert users, consistent with the existing checks for -XX:+ExplicitGCInvokesConcurrent and -XX:+DisableExplicitGC.

fix:#12479

How was this patch tested?

Existing unit tests.

@github-actions github-actions Bot added the CORE works for Gluten Core label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant